﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Vibz.TeamAssignment.Common.Entity
{
    public class Task
    {
        public string Title
        {
            get;
            set;
        }
        public int ParentID
        {
            get;
            set;
        }
        public int TaskID
        {
            get;
            set;
        }
        public string TaskDescription
        {
            get;
            set;
        }
        public DateTime DueDate
        {
            get;
            set;
        }
        public double EstimatedDuration
        {
            get;
            set;
        }
        public double ActualDuration
        {
            get;
            set;
        }
        public int GroupID
        {
            get;
            set;
        }
        public string CreatedBy
        {
            get;
            set;
        }
        public TaskStatus Status
        {
            get;
            set;
        }
        public Task(int parentID, string title, string desc, DateTime dueDate, double estimatedDuration, int grpId)
            : this(parentID, title, desc, dueDate, estimatedDuration, grpId, -1)
        {
        }
        public Task(int parentID, string title, string desc, DateTime dueDate, double estimatedDuration, int grpId, int taskID)
            : this(parentID, title, desc, dueDate, estimatedDuration, grpId, taskID, TaskStatus.Open)
        {
        }
        public Task(int parentID, string title, string desc, DateTime dueDate, double estimatedDuration, int grpId, int taskID,
            TaskStatus status)
            : this(parentID, title, desc, dueDate, estimatedDuration, grpId, taskID, status, -1, "")
        {
        }
        public Task(int parentID, string title, string desc, DateTime dueDate, double estimatedDuration, int grpId, int taskID, 
            TaskStatus status, double actualDuration, string createdBy)
        {
            ParentID = parentID;
            Title = title;
            TaskDescription = desc;
            DueDate = dueDate;
            EstimatedDuration = estimatedDuration;
            TaskID = taskID;
            CreatedBy = createdBy;
            ActualDuration = actualDuration;
            GroupID = grpId;
            Status = status;
        }
    }
}
